<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArSeekurIMU Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArSeekurIMU.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classArSeekurIMU-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArSeekurIMU Class Reference<div class="ingroups"><a class="el" href="group__DeviceClasses.html">Device Interface Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Access extra data provided by optional Seekur IMU.  
 <a href="classArSeekurIMU.html#details">More...</a></p>

<p><code>#include &lt;ArSeekurIMU.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:afde8e65706a01fea6e0501ac39899605"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afde8e65706a01fea6e0501ac39899605"></a>
typedef double&#160;</td><td class="memItemRight" valign="bottom"><b>Vec3</b>[3]</td></tr>
<tr class="separator:afde8e65706a01fea6e0501ac39899605"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab1fb64f6ea60896cf343cfb632eba738"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab1fb64f6ea60896cf343cfb632eba738"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ArSeekurIMU</b> (<a class="el" href="classArRobot.html">ArRobot</a> *robot)</td></tr>
<tr class="separator:ab1fb64f6ea60896cf343cfb632eba738"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4602cab9d31912a70b310ff64e2bba0e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4602cab9d31912a70b310ff64e2bba0e"></a>
const Vec3 &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getAccel</b> () const </td></tr>
<tr class="separator:a4602cab9d31912a70b310ff64e2bba0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e38f082cc4716ea46d6690c96844e3c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e38f082cc4716ea46d6690c96844e3c"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getPitchAccel</b> () const </td></tr>
<tr class="separator:a7e38f082cc4716ea46d6690c96844e3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3af374221eb347a1ef45524e0f3bbe9b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3af374221eb347a1ef45524e0f3bbe9b"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getPitchPos</b> () const </td></tr>
<tr class="separator:a3af374221eb347a1ef45524e0f3bbe9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1edf90ae38831da49c782ce31ef600bd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1edf90ae38831da49c782ce31ef600bd"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getPitchSpeed</b> () const </td></tr>
<tr class="separator:a1edf90ae38831da49c782ce31ef600bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a849f8de547fe413028b00efb6e5bee64"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a849f8de547fe413028b00efb6e5bee64"></a>
const Vec3 &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getPos</b> () const </td></tr>
<tr class="separator:a849f8de547fe413028b00efb6e5bee64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93a7de7e07e1df82e4991c6156157105"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93a7de7e07e1df82e4991c6156157105"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getRollAccel</b> () const </td></tr>
<tr class="separator:a93a7de7e07e1df82e4991c6156157105"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02251f74eafcb9a8be960bd4359a7152"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02251f74eafcb9a8be960bd4359a7152"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getRollPos</b> () const </td></tr>
<tr class="separator:a02251f74eafcb9a8be960bd4359a7152"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afacc763717bb49698128c4e207c17ce7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afacc763717bb49698128c4e207c17ce7"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getRollSpeed</b> () const </td></tr>
<tr class="separator:afacc763717bb49698128c4e207c17ce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc248564409b910e5759ed033d20df3d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abc248564409b910e5759ed033d20df3d"></a>
const Vec3 &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getSpeed</b> () const </td></tr>
<tr class="separator:abc248564409b910e5759ed033d20df3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59d4cb2d757dc9fb90ff0ac0cbb03494"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59d4cb2d757dc9fb90ff0ac0cbb03494"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSeekurIMU.html#a59d4cb2d757dc9fb90ff0ac0cbb03494">getTemperature</a> (void) const </td></tr>
<tr class="memdesc:a59d4cb2d757dc9fb90ff0ac0cbb03494"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the average temperature the IMU has on all axes. <br /></td></tr>
<tr class="separator:a59d4cb2d757dc9fb90ff0ac0cbb03494"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe17a115ec7494868eebbeb443d87710"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe17a115ec7494868eebbeb443d87710"></a>
<a class="el" href="classArTime.html">ArTime</a>&#160;</td><td class="memItemRight" valign="bottom"><b>getTimeLastPacketReceived</b> ()</td></tr>
<tr class="separator:afe17a115ec7494868eebbeb443d87710"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3acaba29f6440bfec4bb3925dff8349"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3acaba29f6440bfec4bb3925dff8349"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getXAccel</b> () const </td></tr>
<tr class="separator:ad3acaba29f6440bfec4bb3925dff8349"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05aceb7ad354d557ed4cca5bab82d24f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a05aceb7ad354d557ed4cca5bab82d24f"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getXPos</b> () const </td></tr>
<tr class="separator:a05aceb7ad354d557ed4cca5bab82d24f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a027f3fab31a867935973311d7a0f0fc9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a027f3fab31a867935973311d7a0f0fc9"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getXSpeed</b> () const </td></tr>
<tr class="separator:a027f3fab31a867935973311d7a0f0fc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0437f30d3420f9dfff70cf357bcd97aa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0437f30d3420f9dfff70cf357bcd97aa"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getYAccel</b> () const </td></tr>
<tr class="separator:a0437f30d3420f9dfff70cf357bcd97aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69d01921805c45f07b753363339dda99"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a69d01921805c45f07b753363339dda99"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getYawAccel</b> () const </td></tr>
<tr class="separator:a69d01921805c45f07b753363339dda99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3cb980b2c4ebe9cb3ab65026a42e4b8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa3cb980b2c4ebe9cb3ab65026a42e4b8"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getYawPos</b> () const </td></tr>
<tr class="separator:aa3cb980b2c4ebe9cb3ab65026a42e4b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a204c01997e683c9ab5107d1c431c4779"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a204c01997e683c9ab5107d1c431c4779"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getYawSpeed</b> () const </td></tr>
<tr class="separator:a204c01997e683c9ab5107d1c431c4779"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ffd964b94a4043c911c997cbc17e421"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ffd964b94a4043c911c997cbc17e421"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getYPos</b> () const </td></tr>
<tr class="separator:a4ffd964b94a4043c911c997cbc17e421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60a5a60c2e8978dccf994730267f8ff6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60a5a60c2e8978dccf994730267f8ff6"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getYSpeed</b> () const </td></tr>
<tr class="separator:a60a5a60c2e8978dccf994730267f8ff6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a304a3323a646735429b6b90fed4a662b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a304a3323a646735429b6b90fed4a662b"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getZAccel</b> () const </td></tr>
<tr class="separator:a304a3323a646735429b6b90fed4a662b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeda6e7758cc3c0b82bd553fe97e3352d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeda6e7758cc3c0b82bd553fe97e3352d"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getZPos</b> () const </td></tr>
<tr class="separator:aeda6e7758cc3c0b82bd553fe97e3352d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a95ca611bf552ec1a29456287fbea05"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a95ca611bf552ec1a29456287fbea05"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>getZSpeed</b> () const </td></tr>
<tr class="separator:a9a95ca611bf552ec1a29456287fbea05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abffa9c74f7876b5a90f2c5fadf944a43"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSeekurIMU.html#abffa9c74f7876b5a90f2c5fadf944a43">haveData</a> () const </td></tr>
<tr class="separator:abffa9c74f7876b5a90f2c5fadf944a43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80ba4e161045bf6b8ac81fc90785fe75"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSeekurIMU.html#a80ba4e161045bf6b8ac81fc90785fe75">numAxes</a> () const </td></tr>
<tr class="separator:a80ba4e161045bf6b8ac81fc90785fe75"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Access extra data provided by optional Seekur IMU. </p>
<p>Seekur and Seekur Jr. robots have either a single-axis "gyro" (accelerometor) or 6-axis IMU connected to the robot controller. The IMU is optional and provides acceleration on 3 linear axes and rotation data on pitch, yaw and roll. The standard Gyro provides yaw rotation data. The Gyro/IMU's primary purpose is to improve large yaw rotation ("theta" component of robot pose) errors due to wheel slippage, wheels coming off the ground, and similar factors. The robot controller will automatically use the yaw (Z) rotational axis of the IMU to correct heading (theta), but you can use this class to also get additional data if you have the optional IMU, such as rotational movement data from all three rotational axes, and linear acceleration in three axes.</p>
<p>If rotational speeds are received, it will be integrated over time to compute an approximate rotational position as well.</p>
<p>If your Seekur robot is not equipped with the optional IMU, then a single-axis accelerometer (gyro) is used instead, and only Z rotational speed will be available.</p>
<p>The IMU self-calibrates during robot startup, so the robot should remain stationary for about a minute after starting up. If an <a class="el" href="classArSeekurIMU.html" title="Access extra data provided by optional Seekur IMU. ">ArSeekurIMU</a> object is created before robot connection, <a class="el" href="classArSeekurIMU.html" title="Access extra data provided by optional Seekur IMU. ">ArSeekurIMU</a> will delay completion of robot connection for a few seconds while it reads some initial data, this will help let the IMU stabilize and self calibrate during startup.</p>
<p>Note: In each robot cycle (100ms), the robot may provide multiple IMU readings acquired since the previous cycle. These are sent together in one packet. Only the last acceleration and speed values are stored in myAccel and mySpeed, but each reading is used to compute myPos (assuming that they were acquired by the robot at regular intervals over the last 100ms robot cycle.) (A possible improvement to this class is to also store a short history of acceleration and speed values. Let us know if you would like to contribute any such improvements.)</p>
<p>Speed, acceleration and position data can be obtained as an array of three components (the Vec3&lt;double&gt; type), or a value from an individual axis can be returned. Yaw and Z refer to the same data; Roll and X are equivalent, as are Pitch and Y. These are just different ways to access the same received data. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="imuExample_8cpp-example.html#_a4">imuExample.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="abffa9c74f7876b5a90f2c5fadf944a43"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSeekurIMU::haveData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>true if a valid IMU packet was received from the robot in the most recent cycle, false if not. </dd></dl>

</div>
</div>
<a class="anchor" id="a80ba4e161045bf6b8ac81fc90785fe75"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int ArSeekurIMU::numAxes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>3 if we have received IMU data for 3 axes, 1 if one (Z/Yaw) axis, 0 if no data has been received. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArSeekurIMU.h</li>
<li>ArSeekurIMU.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArSeekurIMU.html">ArSeekurIMU</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
